﻿using System;
using System.Collections.Generic;

namespace DatabaseStuff
{
    /// <summary>
    /// Represents a table in a database
    /// </summary>
    public interface IDBTable
    {
        /// <summary>
        /// Get the name of this table
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Get the schema used by this table
        /// </summary>
        IDBSchema Schema { get; }

        /// <summary>
        /// Get the records in this table
        /// </summary>
        IEnumerable<IDBRecord> Records { get; }

        /// <summary>
        /// Retrieve a record based on the value of its primary key
        /// </summary>
        IDBRecord GetRecord(object primaryKeyValue);
    }
}
